package com.zuipin.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zuipin.entity.product.ProductDetail;
import com.zuipin.mapper.ProductDetailMapper;
import com.zuipin.service.IProductDetailService;

import net.sf.json.JSONObject;

/**
 * 商品详情业务类实现
 *
 * @ClassName ProductDetailServiceImpl 
 * @author wangcongyi
 * @date 2017年4月20日 下午5:03:37
 */
@Service
public class ProductDetailServiceImpl implements IProductDetailService {
	
	@Resource
	private ProductDetailMapper productDetailMapper;
	
	@Override
	public int deleteByProExtIdAndSysId(Long proExtId, Long sysId) {
		// TODO Auto-generated method stub
		return productDetailMapper.deleteByProExtIdAndSysId(proExtId, sysId);
	}
	
	@Override
	public ProductDetail selectByProSku(JSONObject object) {
		// TODO Auto-generated method stub
		return productDetailMapper.selectByProSku(object);
	}
	
	@Override
	public int deleteByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return 0;
	}
	
	@Override
	public int insert(ProductDetail record) {
		// TODO Auto-generated method stub
		return 0;
	}
	
	@Override
	public boolean insertSelective(ProductDetail record) {
		// TODO Auto-generated method stub
		return productDetailMapper.insertSelective(record);
	}
	
	@Override
	public ProductDetail selectByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return null;
	}
	
	@Override
	public boolean updateByPrimaryKeySelective(ProductDetail record) {
		// TODO Auto-generated method stub
		return productDetailMapper.updateByPrimaryKeySelective(record);
	}
	
	@Override
	public int updateByPrimaryKeyWithBLOBs(ProductDetail record) {
		// TODO Auto-generated method stub
		return 0;
	}
	
	@Override
	public int updateByPrimaryKey(ProductDetail record) {
		// TODO Auto-generated method stub
		return 0;
	}
	
	@Override
	public ProductDetail selectById(Long id) {
		// TODO Auto-generated method stub
		return productDetailMapper.selectByPrimaryKey(id);
	}
	
	@Override
	public List<ProductDetail> findByProExtId(JSONObject params) {
		// TODO Auto-generated method stub
		return productDetailMapper.findByProExtId(params);
	}
	
	@Override
	public int insertBatch(List<ProductDetail> productDetails) {
		// TODO Auto-generated method stub
		return productDetailMapper.insertBatch(productDetails);
	}
	
	@Override
	public ProductDetail selectProDetail(ProductDetail productDetail) {
		// TODO Auto-generated method stub
		return productDetailMapper.selectProDetail(productDetail);
	}
	
}
